home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / s / extract < prev    next >
AmigaDOS Script File  |  1996-05-20  |  1KB  |  55 lines

  1. .key File/A,Pattern/K
  2. .bra «
  3. .ket »
  4. .def Pattern "#?"
  5.  
  6. ;Set Echo ON    ; mode trace
  7.  
  8. ;Path PRG:Pack/ PRG:Pack/Arc/ ADD    ; this is where my GNUTar, GZip, Zoo & Lzx are in
  9.  
  10. UnSet FileType
  11. For "«File»" SFT FTV=FileType DEEP=1
  12.  
  13. IF "$FileType" EQ "LHArc"
  14.     $LhArc $LHAOpts x "«File»"
  15.     Set Error $RC
  16. Else
  17. IF "$FileType" EQ "Lzx"
  18.     Echo "UnLzx..."
  19.     Lzx -x -m e "«File»"
  20.     Set Error $RC
  21. Else
  22. IF "$FileType" EQ "Tar"
  23.     GNUTar -v -M -b 1000 -x -f "«File»"
  24.     Set Error $RC
  25. Else
  26. IF "$FileType" EQ "Tar GZip"
  27.     Echo "Unzip..."
  28.     Stack 32768
  29.     GZip --stdout --recursive --decompress >Tmp_$process.tar "«File»"
  30.     Set Error $RC
  31.     Echo "UnTar..."
  32.     IF $RC EQ 0
  33.         GNUTar -v -M -b 1000 -x -f Tmp_$process.tar
  34.     EndIF
  35.     Set Error $RC
  36.     Delete >NIL: Tmp_$process.tar
  37. Else
  38. IF "$FileType" EQ "Zoo"
  39.     Zoo x// "«File»"
  40.     Set Error $RC
  41. Else
  42.     Echo "Not a known archive:'"$FileType"'"
  43.     Ask "Press RETURN..."
  44. EndIF
  45. EndIF
  46. EndIF
  47. EndIF
  48. EndIF
  49.  
  50. IF $Error GT 0
  51.     Echo "ErrorCode:" $Error
  52.     Say "Error during extracting «File»."
  53.     Ask "Press RETURN..."
  54. EndIF
  55.